Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ZLG-CAN and Tosun CAN device #1351

Closed
wants to merge 51 commits into from
Closed

Add ZLG-CAN and Tosun CAN device #1351

wants to merge 51 commits into from

Conversation

zhuyu4839
Copy link

Add ZLG USB CAN device such as USBCANFD-200U and Tosun USB CAN device such as TC1001, TC1011, TC1004, TC1014, TC1016 etc. support. Including TSMaster COM driver

@zhoulian1992
Copy link

from zlgcan import ZCAN, ZCANDeviceType, ZCAN_Transmit_Data, ZCAN_TransmitFD_Data, ZCAN_Receive_Data,
ZCAN_ReceiveFD_Data, ZCANDataObj, ZCANException, ZCANMessageType, ZCANCanTransType

My zlgcan file doesnot contain "ZCANDeviceType, ZCAN_Transmit_Data, ZCAN_TransmitFD_Data, ZCAN_Receive_Data,
ZCAN_ReceiveFD_Data, ZCANDataObj, ZCANException, ZCANMessageType, ZCANCanTransType". Have you changed the zlgcan.py file?

@zhuyu4839
Copy link
Author

from zlgcan import ZCAN, ZCANDeviceType, ZCAN_Transmit_Data, ZCAN_TransmitFD_Data, ZCAN_Receive_Data, ZCAN_ReceiveFD_Data, ZCANDataObj, ZCANException, ZCANMessageType, ZCANCanTransType

My zlgcan file doesnot contain "ZCANDeviceType, ZCAN_Transmit_Data, ZCAN_TransmitFD_Data, ZCAN_Receive_Data, ZCAN_ReceiveFD_Data, ZCANDataObj, ZCANException, ZCANMessageType, ZCANCanTransType". Have you changed the zlgcan.py file?

Please see https://github.com/zhuyu4839/zlgcan-driver

Copy link
Owner

@hardbyte hardbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution to python-can!

Please add just one interface in a PR.

Please also add docs where appropriate. At a minimum add to doc/interfaces.rst and add
a new interface specific document in doc/interface/tosun and/or doc/interface/zlg.

Testing is always a good idea, hard for software that requires hardware but have a look at how other interfaces have managed it.

Suggest making this PR focus on tosun and working with @keelung-yang to take the best from this PR's zlgcan implementation and #1209.

from can import CanInitializationError
from can.bus import LOG

from tosun import TSCanMessage, TSCanFdMessage, TSMasterException, TosunDevice, TSMasterMessageType
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest adding an entry for the optional dependency tosun in extras_require in setup.py.

Copy link
Author

@zhuyu4839 zhuyu4839 Jun 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ZLG-CAN device has been refactored by using rust and upload to pypi.
https://pypi.org/project/zlgcan-driver-py/

New pull requests at #1784

@hardbyte hardbyte added this to the Next Release milestone Nov 14, 2022
@zariiii9003
Copy link
Collaborator

I see that your library already implements the BusABC API. You could use the plugin interface so your ZCanBus can be used via python-can.

CanInitializationError,
)

from tosun import TSCanMessage, TSCanFdMessage, TSMasterException, TosunDevice, TSMasterMessageType
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from tosun import TSCanMessage, TSCanFdMessage, TSMasterException, TosunDevice, TSMasterMessageType
How can I find/install tosun package?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tosun package is planing to be refactored by using rust

@notmmaoo
Copy link

notmmaoo commented Mar 5, 2023

from tosun import TSCanMessage, TSCanFdMessage, TSMasterException, TosunDevice, TSMasterMessageType
@zhuyu4839
How do I find and install the tosun package?

@luojiaaoo
Copy link
Contributor

I really hope you can pr successfully, because tosun and ZLG are very popular in China😄

from tosun import TSCanMessage, TSCanFdMessage, TSMasterException, TosunDevice, TSMasterMessageType
@zhuyu4839
How do I find and install the tosun package?

The package is not part of pypi, need install TSMaster software, and use it to install tosun,

@CallmeLins
Copy link

I really hope you can pr successfully, because tosun and ZLG are very popular in China😄

from tosun import TSCanMessage, TSCanFdMessage, TSMasterException, TosunDevice, TSMasterMessageType
@zhuyu4839
How do I find and install the tosun package?

The package is not part of pypi, need install TSMaster software, and use it to install tosun,

pr seems still not successful? is there have any plan?

@zhuyu4839 zhuyu4839 closed this by deleting the head repository May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants